<form action="results" method="post">
<h1>Search for a teacher in...</h1>
<?php
	$query = $this->db->get("subjects");
	
	foreach($query->result() as $row){
		$subjectid = $row->subjectid;
		echo "<input type='radio' value='" . $subjectid . "' id='" . $subjectid . "' name='subject' /> " .
		     "<label for='" . $subjectid . "'>" . $row->subjectname  . "</label><br />\n";
	}
	
	echo form_submit('search', "Search");
?>
